The Accordion Pane Component > FAccordionPane (object) |
FAccordionPane (object)
The methods of the Accordion Pane component allow you to control the component at runtime. You can define new sections and items within the sections, respond to user interaction with the component, and manipulate the contents of the component. You do not need to use a constructor to access the methods of the component.
The ActionScript extension for the Accordion Panecomponent is _acp.
If you append this to your component instance names, code hinting and auto-completion
will be available within the Flash authoring environment.
Component methods do not perform error checking for type, as do other native ActionScript objects and actions. Therefore, you should validate parameters before passing them to methods.
Method summary for the FAccordionPane object
Method name |
Description |
|---|---|
Adds a new section to the end of the Accordion Pane, containing the symbol from the linkage id passed in. The content's origin point will not be modified and the content will be attached with the upper left of the content area being the upper left of the content. |
|
Adds a new section at the specified index, containing the symbol from the linkage id passed in. If the specified index already exists, then the section will be inserted at that index, and any existing sections at or above the index will have 1 added to their index. The content's origin point will not be modified and the content will be attached with the upper left of the content area being the upper left of the content. |
|
Adds a listener to the component, which can capture and respond to the 2 events fired by the component. The events are: onEnable and onSelect. |
|
Returns a reference to the movie clip contained within the specified section index. This makes it possible to manipulate, respond to events and call methods on the content within the accordion pane section. |
|
Returns the size of the content area within each section. This method is useful when making dynamically sized content items. |
|
Returns the DataProvider being used to populate the accordion pane. |
|
Returns a Boolean value indicating whether the component is enabled (true) or not (false). |
|
Returns an object containing two properties, label and linkage, which contains information about the specified section. |
|
Returns the number of sections within the component. |
|
| This method returns a number indicating the scroll position of the component. The scroll position is the current Y position of the content within the current section. The scrollbar will only appear if the setScrollBar method has been called and set to true. |
|
| Returns a number indicating the index of the currently selected / open section of the component. |
|
| Returns an Object representing the currently selected item. The object will have two properties, label and linkage, which contains information about the specified section. |
|
| Returns a Boolean value indicating whether content within sections will be displayed as sections are opened and closed. |
|
| Returns an Object representing the currently selected item. The object will have two properties, label and linkage, which contains information about the specified section. |
|
| Removes all sections from the component. Any data associated with the sections will be lost. |
|
| Removes the item / section at the specified index. Any data associated with the item / section will be lost. Any items above the remove index, will have their index reduced by 1. |
|
| This method removes the specified object from the list of Objects listening for events from the component. |
|
| Replaces the item at the specified index with a new item with the specified label and linkage id. |
|
| Specifies the function to be called when the selected section of the component changes. If the second parameter is passed in, the function will be called within the scope of that object. Otherwise, _parent is used. |
|
| This specifies the DataProvider that should be used to create and populate sections of the component. |
|
| Specifies whether the component is enabled (true) or disabled (false). If the component is disabled, it will not accept mouse or keyboard interaction from the user. The component will also be grayed-out to visually indicate its state to the user. |
|
| This method specifies a number indicating the scroll position of the component. The scroll position is the current Y position of the content within the current section. The scrollbar will only appear if the setScrollBar method has been called and set to true. |
|
| Specifies the index of the section that should be selected / opened within the component. If the specified index does not exist, the method call will be ignored. |
|
| This method specifies whether content within sections should be displayed while the sections are opening and closing. True indicates that the content should be displayed, while false indicates that the content should not be displayed during the transitions. |
|
| Specifies the height and width of the component. If the height is not big enough to support the minimum area of 0 pixels for the content area the component will be resized to allow for the 0 pixels. |
|
| This method specifies the number of frames it will take a section of the component to complete a transition (opening and closing). |
|
| This method specifies whether to show a vertical scrollbar on content sections that are too tall (true) or not (false). If the content area size is less than 35 pixels high the scrollbar would be to large to show so the component does not show it. If set to true, the scrollbar will only appear if it is needed. |
|
| This methods sorts the component by the field specified in the first parameter. The fields used by the component are "label" and "linkage", although it is possible to define additional fields and sort by those. If "DESC" is passed in as the second parameter, the component will be sorted in descending order. Otherwise, the component sorts in ascending order. |